package IO流;

import java.io.*;

public class Inputstream {
    public static void main(String[] args) throws IOException {
//        File file = new File("C:\\Users\\PC\\Desktop\\test.png");
//        File filec = new File("C:\\Users\\PC\\Desktop\\test1.png");
//        InputStream is = new FileInputStream(file);
//        OutputStream os = new FileOutputStream(filec);
//        int i = is.available();
//        byte[] bytes = new byte[2048];
//        is.read(bytes);
//        if (is.read()!=-1)
//            System.out.println("文件尚未读完整");
//        else
//            System.out.println("文件读取结束");
//        os.write(bytes);
//        is.close();
//        os.close();


        BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream("C:\\Users\\PC\\Desktop\\test.txt")));
        String line = null;
        while ((line = br.readLine())!=null){
            System.out.println(line);
        }
    }
}
